<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body>
<h1>JavaScript Example 23</h1>
<br>
Shows How to Handle Exceptions <br><br>
<br>
<hr>
<br>

<!-- SCRIPT STARTS HERE -->

<script type="text/javascript">
	try {
		// line of non sense code
		"this_is_not_an_object".thisIsNotAMethod();
	}
	catch (anException){
		// here we can reference the exception!
		alert("Error " + anException);
	}
	
</script>

<!-- SCRIPT ENDS HERE -->

</body>
</html>

